home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / i386 / vsta.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  2KB  |  79 lines

  1. /* Configuration for an i386 running VSTa micro-kernel.
  2.    Copyright (C) 1994 Free Software Foundation, Inc.
  3.    Contributed by Rob Savoye (rob@cygnus.com).
  4.  
  5. This file is part of GNU CC.
  6.  
  7. GNU CC is free software; you can redistribute it and/or modify
  8. it under the terms of the GNU General Public License as published by
  9. the Free Software Foundation; either version 2, or (at your option)
  10. any later version.
  11.  
  12. GNU CC is distributed in the hope that it will be useful,
  13. but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. GNU General Public License for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with GNU CC; see the file COPYING.  If not, write to
  19. the Free Software Foundation, 59 Temple Place - Suite 330,
  20. Boston, MA 02111-1307, USA.  */
  21.  
  22. #define YES_UNDERSCORES
  23.  
  24. #include "i386/gas.h"
  25.  
  26. #ifdef CPP_PREDEFINES
  27. #undef CPP_PREDEFINES
  28. #endif
  29. #define CPP_PREDEFINES "-Dunix -Di386 -DVSTA \
  30.   -Asystem(unix) -Asystem(vsta) -Acpu(i386) -Amachine(i386)"
  31.  
  32. #undef EXTRA_SECTIONS
  33. #define EXTRA_SECTIONS in_ctor, in_dtor
  34.  
  35. #undef EXTRA_SECTION_FUNCTIONS
  36. #define EXTRA_SECTION_FUNCTIONS                    \
  37.   CTOR_SECTION_FUNCTION                        \
  38.   DTOR_SECTION_FUNCTION
  39.  
  40. #define CTOR_SECTION_FUNCTION                    \
  41. void                                \
  42. ctor_section ()                            \
  43. {                                \
  44.   if (in_section != in_ctor)                    \
  45.     {                                \
  46.       fprintf (asm_out_file, "\t.section .ctor\n");        \
  47.       in_section = in_ctor;                    \
  48.     }                                \
  49. }
  50.  
  51. #define DTOR_SECTION_FUNCTION                    \
  52. void                                \
  53. dtor_section ()                            \
  54. {                                \
  55.   if (in_section != in_dtor)                    \
  56.     {                                \
  57.       fprintf (asm_out_file, "\t.section .dtor\n");        \
  58.       in_section = in_dtor;                    \
  59.     }                                \
  60. }
  61.  
  62. #define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME)    \
  63.   do {                        \
  64.     ctor_section ();                \
  65.     fprintf (FILE, "%s\t", ASM_LONG);        \
  66.     assemble_name (FILE, NAME);            \
  67.     fprintf (FILE, "\n");            \
  68.   } while (0)
  69.  
  70. #define ASM_OUTPUT_DESTRUCTOR(FILE,NAME)           \
  71.   do {                        \
  72.     dtor_section ();                           \
  73.     fprintf (FILE, "%s\t", ASM_LONG);        \
  74.     assemble_name (FILE, NAME);                  \
  75.     fprintf (FILE, "\n");            \
  76.   } while (0)
  77.  
  78.  
  79.